Optimal. Leaf size=194 \[ \frac {\left (a^2 (m+2)+b^2 (m+1)\right ) \cos (e+f x) (d \sin (e+f x))^{m+1} \, _2F_1\left (\frac {1}{2},\frac {m+1}{2};\frac {m+3}{2};\sin ^2(e+f x)\right )}{d f (m+1) (m+2) \sqrt {\cos ^2(e+f x)}}+\frac {2 a b \cos (e+f x) (d \sin (e+f x))^{m+2} \, _2F_1\left (\frac {1}{2},\frac {m+2}{2};\frac {m+4}{2};\sin ^2(e+f x)\right )}{d^2 f (m+2) \sqrt {\cos ^2(e+f x)}}-\frac {b^2 \cos (e+f x) (d \sin (e+f x))^{m+1}}{d f (m+2)} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.13, antiderivative size = 194, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.130, Rules used = {2789, 2643, 3014} \[ \frac {\left (a^2 (m+2)+b^2 (m+1)\right ) \cos (e+f x) (d \sin (e+f x))^{m+1} \, _2F_1\left (\frac {1}{2},\frac {m+1}{2};\frac {m+3}{2};\sin ^2(e+f x)\right )}{d f (m+1) (m+2) \sqrt {\cos ^2(e+f x)}}+\frac {2 a b \cos (e+f x) (d \sin (e+f x))^{m+2} \, _2F_1\left (\frac {1}{2},\frac {m+2}{2};\frac {m+4}{2};\sin ^2(e+f x)\right )}{d^2 f (m+2) \sqrt {\cos ^2(e+f x)}}-\frac {b^2 \cos (e+f x) (d \sin (e+f x))^{m+1}}{d f (m+2)} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2643
Rule 2789
Rule 3014
Rubi steps
\begin {align*} \int (d \sin (e+f x))^m (a+b \sin (e+f x))^2 \, dx &=\frac {(2 a b) \int (d \sin (e+f x))^{1+m} \, dx}{d}+\int (d \sin (e+f x))^m \left (a^2+b^2 \sin ^2(e+f x)\right ) \, dx\\ &=-\frac {b^2 \cos (e+f x) (d \sin (e+f x))^{1+m}}{d f (2+m)}+\frac {2 a b \cos (e+f x) \, _2F_1\left (\frac {1}{2},\frac {2+m}{2};\frac {4+m}{2};\sin ^2(e+f x)\right ) (d \sin (e+f x))^{2+m}}{d^2 f (2+m) \sqrt {\cos ^2(e+f x)}}+\left (a^2+\frac {b^2 (1+m)}{2+m}\right ) \int (d \sin (e+f x))^m \, dx\\ &=-\frac {b^2 \cos (e+f x) (d \sin (e+f x))^{1+m}}{d f (2+m)}+\frac {\left (a^2+\frac {b^2 (1+m)}{2+m}\right ) \cos (e+f x) \, _2F_1\left (\frac {1}{2},\frac {1+m}{2};\frac {3+m}{2};\sin ^2(e+f x)\right ) (d \sin (e+f x))^{1+m}}{d f (1+m) \sqrt {\cos ^2(e+f x)}}+\frac {2 a b \cos (e+f x) \, _2F_1\left (\frac {1}{2},\frac {2+m}{2};\frac {4+m}{2};\sin ^2(e+f x)\right ) (d \sin (e+f x))^{2+m}}{d^2 f (2+m) \sqrt {\cos ^2(e+f x)}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.33, size = 144, normalized size = 0.74 \[ -\frac {\cos (e+f x) \sin ^2(e+f x)^{\frac {1}{2} (-m-1)} (d \sin (e+f x))^m \left (a \left (a \sin (e+f x) \, _2F_1\left (\frac {1}{2},\frac {1-m}{2};\frac {3}{2};\cos ^2(e+f x)\right )+2 b \sqrt {\sin ^2(e+f x)} \, _2F_1\left (\frac {1}{2},-\frac {m}{2};\frac {3}{2};\cos ^2(e+f x)\right )\right )+b^2 \sin (e+f x) \, _2F_1\left (\frac {1}{2},\frac {1}{2} (-m-1);\frac {3}{2};\cos ^2(e+f x)\right )\right )}{f} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [F] time = 0.53, size = 0, normalized size = 0.00 \[ {\rm integral}\left (-{\left (b^{2} \cos \left (f x + e\right )^{2} - 2 \, a b \sin \left (f x + e\right ) - a^{2} - b^{2}\right )} \left (d \sin \left (f x + e\right )\right )^{m}, x\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int {\left (b \sin \left (f x + e\right ) + a\right )}^{2} \left (d \sin \left (f x + e\right )\right )^{m}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [F] time = 7.29, size = 0, normalized size = 0.00 \[ \int \left (d \sin \left (f x +e \right )\right )^{m} \left (a +b \sin \left (f x +e \right )\right )^{2}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int {\left (b \sin \left (f x + e\right ) + a\right )}^{2} \left (d \sin \left (f x + e\right )\right )^{m}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.01 \[ \int {\left (d\,\sin \left (e+f\,x\right )\right )}^m\,{\left (a+b\,\sin \left (e+f\,x\right )\right )}^2 \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________